Hello and welcome.
In our previous lectures we went through how to create the functions and variables that will make the
bricks vanish or disappear after they've been hit.
We also create take function to track the State of the coalition to determine if a board or the break
has been hit by the ball or not.
In this lecture we will be activating all that by calling the coalition detection function so we can
add quality to completion detection function that we create.
We then add it inside the draw function so that it is called from there.
An everything will be activated and then we can practice and we can see the ball actually hitting the
brick and watching the bricks disappear.
So let's go ahead and do that.
So these are our functions here so let's look for where the other functions have been called from.
So if you look at the function you draw this is where we we are calling the other functions from.
So we want to add the quality detection function here just on the need the drol pad slate is called
after the drop.
So what we do will do collusion.
So we're typing the name of the function which is collision right there.
Coalition detection.
And this is.
And then the semicolon.
All right so we as done have now added it so I save that.
So if we load up the game we should see that in effect so win the ball and he hits the brick the bridge
should disappear.
So let's have a look.
All right.
This is the game now with the coalition detection activated so far used the panel and the ball should
bounce off the pad and hit the bricks.
The bricks should disappear.
So let me have a go.
Just have a look.
Okay I lost that one.
I lost again.
Go home.
Very good Sir Kenneth havlik again.
He seeing some of the bricks have been
here that's been set so we can see that the coalition detection is actually working because when the
ball bounces off the paddle the orange rectangle Here's a look if it bounces off the rectangle and hits
the brake it disappears.
Obviously the ball should touch the bottom of the canvas then you lose the game so the goal is not to
let the ball touch the bottom of the compass.
And if you're able to use the ball to hit or the breaks and all the bricks disappear from the canvas
then you have won the game.
So in the nex section we are going to try and implement some scoring so that you could get this score.
Point is time you hit it brick.
Thank you so much for watching.
Bye for now.